#include "monstertable.h"

MTEntry::MTEntry(string s, char c, int fore)
{
  name = s;
  symbol = c;
  foreColor = fore;
}

string MTEntry::getName()
{
  return name;
}

char MTEntry::getSymbol()
{
  return symbol;
}

int MTEntry::getFore()
{
  return foreColor;
}

MonsterTable::MonsterTable()
{
  MTEntry* entry = new MTEntry("Rat", 'r', COLOR_YELLOW);
  entries.push_back(entry);
  entry = new MTEntry("Blue Dragon", 'D', COLOR_BLUE);
  entries.push_back(entry);
}

MTEntry* MonsterTable::lookup_name(string s)
{
  for(int i = 0; i < entries.size(); i++)
  {
    if (entries[i]->getName() == s)
    {
      return entries[i];
    }
  }
  return NULL;
}
